import 'package:flutter/material.dart';

class ConstrainBoxDemo extends StatelessWidget {
  const ConstrainBoxDemo({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('ConstrainBoxDemo'),
      ),
      body: Center(
          child: Column(
        children: <Widget>[
          ConstrainedBox(
            // 边界约束
            constraints: BoxConstraints(
              minHeight: 300.0,
              maxWidth: 200.0,
            ),
            child: Container(
              color: Color.fromRGBO(200, 54, 255, 1.0),
              child: Text('Animat殊的Animation对象。其nimationController在给定0到1.0的值。'),
            ),
          ),
        ],
      )),
    );
  }
}
